#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/vmalloc.h>
#include <linux/pagemap.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/ethtool.h>
#include <linux/if_vlan.h>
#include <linux/cpu.h>
#include <linux/smp.h>
#include <linux/pm_qos.h>
#include <linux/pm_runtime.h>
#include <linux/aer.h>
#include <linux/prefetch.h>
#include <linux/suspend.h>

char  pci_test_driver_name[] = "pci_test";


static int pci_teste_pm_freeze(struct device *dev)
{
	return 0;
}

static int pci_teste_pm_thaw(struct device *dev)
{
	return 0;
}

static __maybe_unused int pci_teste_pm_prepare(struct device *dev)
{
	return 0;
}

static __maybe_unused int pci_teste_pm_suspend(struct device *dev)
{
	return 0;
}

static __maybe_unused int pci_teste_pm_resume(struct device *dev)
{
	return 0;
}

static __maybe_unused int pci_teste_pm_runtime_idle(struct device *dev)
{
		return 0;
}

static __maybe_unused int pci_teste_pm_runtime_resume(struct device *dev)
{
	return 0;
}

static __maybe_unused int pci_teste_pm_runtime_suspend(struct device *dev)
{
	return 0;
}

static void pci_test_shutdown(struct pci_dev *pdev)
{
}


static int pci_test_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
	return 0;
}

static void pci_test_remove(struct pci_dev *pdev)
{
}

static const struct pci_device_id pci_test_pci_tbl[] = {
	{ PCI_DEVICE(0x1234, 0x105E) },
	{ 0, 0, 0, 0, 0, 0, 0 }	/* terminate list */
};
MODULE_DEVICE_TABLE(pci, pci_test_pci_tbl);

static const struct dev_pm_ops pci_test_pm_ops = {
#ifdef CONFIG_PM_SLEEP
	.prepare	= pci_teste_pm_prepare,
	.suspend	= pci_teste_pm_suspend,
	.resume		= pci_teste_pm_resume,
	.freeze		= pci_teste_pm_freeze,
	.thaw		= pci_teste_pm_thaw,
	.poweroff	= pci_teste_pm_suspend,
	.restore	= pci_teste_pm_resume,
#endif
	SET_RUNTIME_PM_OPS(  pci_teste_pm_runtime_suspend, 
			     pci_teste_pm_runtime_resume,
			     pci_teste_pm_runtime_idle)
};

/* PCI Device API Driver */
static struct pci_driver test_driver = {
	.name     = pci_test_driver_name,
	.id_table = pci_test_pci_tbl,
	.probe    = pci_test_probe,
	.remove   = pci_test_remove,
	.driver   = {
		.pm = &pci_test_pm_ops,
	},
	.shutdown = pci_test_shutdown,
};

static int __init pci_test_init_module(void)
{
	pr_info("Intel(R) PRO/1000 Network Driver\n");

	return pci_register_driver(&test_driver);
}
module_init(pci_test_init_module);

static void __exit pci_test_exit_module(void)
{
	pci_unregister_driver(&test_driver);
}
module_exit(pci_test_exit_module);

MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>");
MODULE_DESCRIPTION("Intel(R) PRO/1000 Network Driver");
MODULE_LICENSE("GPL v2");
